package com.gy.smartmanagement.welcome;

import android.content.Intent;
import android.os.Bundle;

import com.gy.smartmanagement.base.activity.BaseNoToolbarActivity;
import com.gy.smartmanagement.home.MainActivity;
import com.gy.smartmanagement.login.LoginActivity;
import com.gy.smartmanagement.utils.ConstanceValue;

public class WelcomeActivity extends BaseNoToolbarActivity {
  @Override
  protected void initFragment(Bundle savedInstanceState) {
    String token= (String) application.getCacheData(ConstanceValue.TOKEN,"");
    if(token.equals("")){
      startActivity(new Intent(this, LoginActivity.class));
    }else {
      startActivity(new Intent(this, MainActivity.class));
    }
  }

  @Override
  protected int getLayoutResId() {
    return 0;
  }
}
